package tech.aistar.corejava.day06.HomeWork;

/**
 * Created by 李雨昂 on 2019/7/22.
 */
public class CreditAccount extends Account {
    private double maximumOverdraft;
    private int  credit;

    public CreditAccount() {

    }

    public CreditAccount(int accNo, String accName, int accPassword, String accTelno, double accBalance, int accType, double maximumOverdraft, int credit) {
        super(accNo, accName, accPassword, accTelno, accBalance, accType);
        this.maximumOverdraft = maximumOverdraft;
        this.credit = credit;
    }

    public double getMaximumOverdraft() {
        return maximumOverdraft;
    }

    public void setMaximumOverdraft(double maximumOverdraft) {
        this.maximumOverdraft = maximumOverdraft;
    }

    public int getCredit() {
        return credit;
    }

    public void setCredit(int credit) {
        this.credit = credit;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("CreditAccoun{");
        sb.append("maximumOverdraft=").append(maximumOverdraft);
        sb.append(", credit=").append(credit);
        sb.append('}');
        return super.toString()+sb.toString();
    }
}
